package com.haojiang.mh.service.entity

/**
 * 板子实时数据
 *
 * Created by ZapFive on 2019-06-04.
 *
 * wuzhuang@mirahome.me
 */
class BleNewData {
//    var WS = 0//联网状态 1:已连接网络，0:未连接网络  去除此字段
    var Left = Data()//左边数据
    var Right = Data()//右边数据

    inner class Data {
        var HD = 0//心率数据
        var BD = 0//呼吸数据
        var IsOnBed = 0//是否在床 0:离床 1:在床
        var IsMove = 0//是否有体动 0:无体动 1:有体动
        var Std = 1//1:离床 2:校验 3:稳定

        fun isDefaultData(): Boolean {
            return HD == 0 && BD == 0 && IsOnBed == 0 && IsMove == 0
        }

        override fun toString(): String {
            return "Data(HD=$HD, BD=$BD, IsOnBed=$IsOnBed, IsMove=$IsMove, Std=$Std)"
        }
    }

    override fun toString(): String {
        return "BleNewData( Left=$Left, Right=$Right)"
    }
}